<div class="card border-info m-3">
    <h5 class="card-header bg-info text-white">新增</h5>
    <div class="card-body">
        <h5 class="card-title">基础信息</h5>
        <p class="card-text">请按内容提示，录入相关信息。</p>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select
                        [items]="extend.domain.mesType.items"
                        [multiple]="false"
                        [closeOnSelect]="true"
                        [searchable]="true"
                        bindLabel="name" bindValue="id"
                        placeholder="{{extend.domain.mesType.nickname}}" tooltip="{{extend.domain.mesType.nickname}}"
                        [(ngModel)]="domain.fkMesType"
                        (change)="extend.domain.mesType.change($event)">
                </ng-select>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['MesTemplate.fkMesType'] !== null">{{errRes.error?.detail['MesTemplate.fkMesType']}}</span>
            </div>
            <div class="col-6"></div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">编号</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serNum">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['MesTemplate.serNum'] !== null">{{errRes.error?.detail['MesTemplate.serNum']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">主题</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serTheme">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['MesTemplate.serTheme'] !== null">{{errRes.error?.detail['MesTemplate.serTheme']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-12">
                <h4>模板内容</h4>
                <span class="badge badge-pill badge-primary">$memberName 会员名称</span>
                <span class="badge badge-pill badge-primary">$orderNum 订单编号</span>
                <span class="badge badge-pill badge-primary">$logisticsNum 物流单号</span>
                <div [froalaEditor]='froalaEditorOptions' [(froalaModel)]="domain.serEditorContent">Loading...</div>
            </div>
        </div>

        <div class="text-center mt-5">
            <button type="button" class="btn btn-outline-primary" (click)="func.save.req($event)">Save</button>
        </div>
    </div>
</div>

<span class="badge badge-info mr-3" *ngIf="errRes?.error?.timestamp !== null">response time: {{errRes?.error?.timestamp}}</span>
<div *ngIf="false">
    <p>{{errRes.error}}</p>
    <p>{{errRes.error?.code}}</p>
    <p>{{errRes.error?.description}}</p>
    <p>{{errRes.error?.theme}}</p>
    <p>{{errRes.error?.timestamp}}</p>
    <p>{{errRes.error?.detail?.RR?.duration}}</p>
    <p>{{errRes.error?.detail['MesTemplate.serNum']}}</p>
    <p>{{errRes.error?.detail['MesTemplate.serAudit']}}</p>
    <p>{{errRes.error?.detail['MesTemplate.serValid']}}</p>
    <p>{{errRes.error?.detail['MesTemplate.serValid2']}}</p>
    <p>{{errRes.headers}}</p>
    <p>{{errRes.message}}</p>
    <p>{{errRes.name}}</p>
    <p>{{errRes.ok}}</p>
    <p>{{errRes.status}}</p>
    <p>{{errRes.statusText}}</p>
    <p>{{errRes.url}}</p>
</div>
